package cn.tedu.spring.config;

import cn.tedu.spring.bean.UserDao;
import cn.tedu.spring.file.Database;
import cn.tedu.spring.life.Lift;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 董代恒
 * @version 1.0
 */
public class TestAppConfig {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext(AppConfig.class);
        Database database = context.getBean(Database.class);
        System.out.println(database);
        Lift lift = context.getBean(Lift.class);
        System.out.println(lift);
        UserDao userDao = context.getBean(UserDao.class);
        System.out.println(userDao);
    }
}
